Application developers frequently develop applications using Application Programming Interfaces (APIs), which are typically supplied by vendors and other groups. In the most generic sense, APIs define a software application environment or operating system with which applications can interface. APIs include as part of their definition a set of defined interfaces for methods to which applications can issue requests.
An example of a language and development environment that delivers APIs is the Java™ language, developed by Sun Microsystems. Java delivers APIs via classes grouped in class libraries. An integral component of the Java architecture is the Java Virtual Machine (JVM), which is available on numerous computing platforms in order to provide Java with a high level of platform independence. The Java 2 Platform, Micro Edition (J2ME™), specifies a scaled-down version of the JVM, known as the K Virtual Machine (KVM), designed for mobile wireless information devices such as cellular phones and personal digital assistants (PDAs).
J2ME currently provides two configurations, Connected Limited Device Configuration (CLDC) and Connected Device Configuration (CDC). CDC was developed for more powerful devices, and therefore supports a full Java 2 Virtual Machine. CLDC is targeted at devices with limited memory and/or processing power, and does not support standard Java 2 Standard Edition (J2SE) APIs. CLDC includes a core development library and specifies the KVM. A Mobile Information Device Profile (MIDP) is layered on top of CLDC and defines a set of Java APIs that provide an application runtime environment for mobile information devices, such as mobile telephones. These APIs include the user interface, networking and messaging. MIDP is defined in Mobile Information Device Profile (JSR-37), JCP Specification, Java 2 Platform, Micro Edition, 1.0a (Sun Microsystems Inc., Palo Alto, Calif., December 2000), which is incorporated herein by reference. MIDP applications that use the MIDP and CLDC APIs are known as MIDlets, which are executed on the KVM.
Sun Microsystems has made available a Wireless Toolkit (WTK) for use in developing J2ME applications suitable for running on mobile devices. Source code for the WTK is available under license from Sun. WTK provides an emulation function, which enables the application developer's workstation to emulate the operation of a target mobile device so that the developer can see how the application will run in the target environment.
An emulator running on a personal computer or other workstation preferably can emulate the behavior of a variety of target devices that run J2ME virtual machines. Each target device supports a core API and a combination of optional APIs. An emulator should be configurable to provide access only to the APIs supported by the selected target device, and not to other APIs not supported by the target device. This device-specific configurability is essential for providing a reliable application development and testing environment. It may not be feasible, however, to provide an emulator for each combination of APIs supported in available devices, as the number of possible combinations is often too great. In addition, all possible combinations may not be known at the time the toolkit is supplied.
The natural solution to this problem is to configure the emulator to support the core API, and then to allow the user to select which optional APIs to use. This is the solution that is used in J2SE application development. It is not practical on an emulator for J2ME, however, because J2ME virtual machines are by their nature not extensible; they have a fixed set of APIs preinstalled in a ROM image.
Although this problem has been described herein with reference to Java and J2ME, a similar problem would occur in any development environment in which an application being developed must be denied access to APIs not supplied in the target run-time environment. Additionally, this problem may occur when an application developer uses a single development environment to develop different versions of an application for execution on different target platforms, each of which may have a different subset of an overall API set. In such a case, it is desirable to limit the API subset per implementation in an efficient manner.
The need to efficiently limit access to certain APIs may similarly arise when an application developer is developing applications for a market that will not be purchasing certain optional APIs, for example to minimize per-API software license fees.
Sun, Sun Microsystems, the Sun Logo, Java, J2ME are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries.